package com.bao.work.video.entity;

import com.bao.work.video.enum1.Type;

/**
 * @author baoye
 * @date 2024-08-01/17:04
 */
public class Video {
    private String name;
    private Type type;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        Video video = (Video) o;

        return name != null ? name.equals(video.name) : video.name == null;
    }

    @Override
    public int hashCode() {
        return name != null ? name.hashCode() : 0;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Type getType() {
        return type;
    }

    public void setType(Type type) {
        this.type = type;
    }

    public Video() {
    }

    public Video(String name, Type type) {
        this.name = name;
        this.type = type;
    }

    @Override
    public String toString() {
        return "电影名称:"+name+ "\n"
                +"电影类型:"+type+"片";
    }
}
